<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>渐变练习</title>
    <style>
        #box {
            height: 400px;
            width: 400px;
            border: 5px solid black;
            background: linear-gradient(to bottom, red, green, blue);
        }

        #box2 {
            height: 400px;
            width: 400px;
            border: 5px solid black;
            background: radial-gradient(circle at 10% 20%,rgb(238, 0, 255)25%,rgb(255, 0, 64)75%);
        }
        #box3 {
            height: 400px;
            width: 400px;
            border: 5px solid black;
            background: radial-gradient( ellipse,rgb(238, 0, 255)25%,rgb(255, 0, 64)75%);
        }
    </style>
</head>

<body>
    <div id="box">线性渐变</div>
    <div id="box2">径向渐变</div>
    <div id="box3">径向渐变</div>
</body>

</html>